import { GetanFormProps } from "../types"

/**
 * 解释表单子项
 */
export function useFormItem(props: Ref<GetanFormProps>, formData: Ref<Recordable>) {
    const itemsRef = computed(() => {
        const { items } = unref(props)
        return { ...items, data: formData }
    })

    return { items: itemsRef }
}
